#ifndef M_SPI_H
#define M_SPI_H "m_spi"

#define M_SPI_SUPPORT_HI3861

typedef struct {
    unsigned char *sendBuf;
    unsigned char *recvBuf; 
    unsigned int recvSize;
} m_spi_data;

typedef struct {
    unsigned int cpol : 1;
    unsigned int cpha : 1;
    unsigned int fram_mode : 2;
    unsigned int data_width : 4;
    unsigned int endian : 1;
    unsigned int freq;
} m_spi_init_param;


int m_spi_init();
int m_spi_host_write_read(m_spi_data *data);

#endif